package com.example.cloudtrade;

import static androidx.core.content.ContextCompat.startActivity;

import android.content.Context;
import android.content.Intent;

public class ActivityUtils {
    /**
     * 启动指定的 Activity
     * @param context 上下文对象
     * @param targetActivity 目标 Activity 的 Class 对象
     */
    public static void startActivity(Context context, Class<?> targetActivity) {
        Intent intent = new Intent(context, targetActivity);
        context.startActivity(intent);
    }
}
